Skip to content

ENG-10376 docs: add enterprise auth audit hook page - #6818

Merged
masenf merged 5 commits into
reflex-dev:mainfrom
FarhanAliRaza:farhan/eng-10376-audit-hook-docs
Aug 6, 2026
Merged

ENG-10376 docs: add enterprise auth audit hook page#6818
masenf merged 5 commits into
reflex-dev:mainfrom
FarhanAliRaza:farhan/eng-10376-audit-hook-docs

Conversation

@FarhanAliRaza

Copy link
Copy Markdown
Contributor

Summary

Documents the new AuthPlugin(audit=...) observe-only audit hook (implemented in reflex-dev/reflex-enterprise#200, shipping in reflex-enterprise 0.9.3):

  • New page docs/enterprise/auth/audit.md — configuration (callable / import-path string, eager validation), the action/outcome taxonomy tables, the AuditContext field reference, and the semantics users need to know: observe-only + fail-open, awaited inline (keep hooks fast), what is and isn't audited, event_handler/allowed volume, redaction responsibility, popup-flow event pairing, and writing events into app state via context.state.
  • Registered in the enterprise sidebar (Authentication → "Auditing Auth Actions") and in docs/enterprise/overview.md's Authentication block (count 6 → 7).

Notes

  • Content mirrors the reflex_enterprise.auth.audit module docstring and was validated against the implementation (all snippets exercised by the unit/integration tests in the enterprise PR).
  • Should land alongside / after reflex-dev/reflex-enterprise#200; the page is marked "New in reflex-enterprise v0.9.3.".

Testing

  • enterprise.auth.audit.path and the sidebar entry verified to resolve via reflex_docs import (docgen auto-generates the page from the md tree; /enterprise/auth whitelist prefix covers the route).

Documents AuthPlugin(audit=...) — the observe-only audit hook shipping in
reflex-enterprise 0.9.3 (reflex-dev/reflex-enterprise#200): configuration,
action/outcome taxonomy, the AuditContext reference, and the fail-open,
volume, privacy, and popup-flow semantics. Registers the page in the
enterprise sidebar and the overview's Authentication block.
@FarhanAliRaza
FarhanAliRaza requested review from a team and Alek99 as code owners July 28, 2026 20:03
@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds documentation and navigation for the enterprise authentication audit hook.

  • Documents audit-hook configuration, event taxonomy, context fields, operational semantics, and usage examples.
  • Adds the audit page to the enterprise authentication sidebar and feature overview.
  • Updates the docs application dependency and lockfile to reflex-enterprise 0.9.3.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
docs/enterprise/auth/audit.md Adds the comprehensive enterprise authentication audit-hook documentation and examples.
docs/app/reflex_docs/templates/docpage/sidebar/sidebar_items/enterprise.py Registers the new audit documentation page in the enterprise authentication sidebar.
docs/enterprise/overview.md Adds the audit hook to the enterprise feature catalog and updates its feature count.
docs/app/pyproject.toml Raises the minimum reflex-enterprise version to the release containing the documented audit hook.
uv.lock Locks reflex-enterprise 0.9.3 consistently with the docs application manifest.

Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'origin/cla..." | Re-trigger Greptile

@codspeed-hq

codspeed-hq Bot commented Jul 28, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 26 untouched benchmarks
⏩ 8 skipped benchmarks1


Comparing FarhanAliRaza:farhan/eng-10376-audit-hook-docs (129dadc) with main (08a9218)

Open in CodSpeed

Footnotes

  1. 8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e4ade4a58

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/enterprise/auth/audit.md Outdated
@FarhanAliRaza
FarhanAliRaza marked this pull request as draft July 28, 2026 20:13
FarhanAliRaza and others added 4 commits August 6, 2026 02:48
Documents AuthPlugin(audit=...) — the observe-only audit hook shipping in
reflex-enterprise 0.9.3 (reflex-dev/reflex-enterprise#200): configuration,
action/outcome taxonomy, the AuditContext reference, and the fail-open,
volume, privacy, and popup-flow semantics. Registers the page in the
enterprise sidebar and the overview's Authentication block.
reflex-enterprise 0.9.3 (the release shipping AuthPlugin(audit=...)) is
out, so the docs app can now depend on it:

- docs/app: bump the reflex-enterprise floor 0.9.1 -> 0.9.3, update
  uv.lock to the published 0.9.3 artifacts.

Review feedback on the audit page (reflex-dev#6818):

- Stop implying an audit event can be handed directly to a JSON/SIEM
  encoder: AuditContext carries live State/AuthUserState/EventHandler
  objects and an arbitrary payload, so a standard JSON encoder raises
  TypeError. Recommend projecting to the plain fields the sink needs.
- Document that context.route has query/fragment stripped (the query
  can carry OAuth codes or invite tokens), matching _redact_route.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HV6yayZcAfarxTDwSZY2oL
…r-bvzo8d' into farhan/eng-10376-audit-hook-docs

@masenf masenf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this still draft? it looks mergable to me, now that i brought in the actual audit functionality and shipped 0.9.3

@FarhanAliRaza

Copy link
Copy Markdown
Contributor Author

It is ready to merge just wanted to test behavior after ai review fixes.

@FarhanAliRaza
FarhanAliRaza marked this pull request as ready for review August 6, 2026 06:14

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Tip: cubic could auto-approve low-risk PRs like this, if it thinks it's safe to merge. Learn more

Re-trigger cubic

@masenf
masenf merged commit 346177c into reflex-dev:main Aug 6, 2026
109 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants